<template>
  <div class="loading" v-if="mainStore.isLoading">
    <van-loading color="#fff" type="spinner" size="40"></van-loading>
  </div>
</template>

<script setup>
import useMainStore from "../../stores/modules/mainStore";
const mainStore = useMainStore();
</script>

<style lang="less" scoped>
.loading {
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translateX(-50%);
  z-index: 10;
  padding: 10px;
  border-radius: 10px;
  background-color: #aaa;
}
</style>
